#include "stdafx.h"
#include "myapplet.h"
#include "DemoDlg.h"


//////////////// Locals / Defines  ////////////////////////////////////////////

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

//The one and only app
CApp theApp;


//////////////// Implementation ///////////////////////////////////////////////

IMPLEMENT_DYNAMIC(CApp, CControlPanelApp);
IMPLEMENT_CPLAPP()

//For demonstration purposes put this applet in the "Performance and Maintenance" category on Windows XP / Windows Server 2003.
//This is known as the "System and Maintenance" category on Windows Vista and later. Also register using a GUID, Canonical Name, 
//a Task links file (taken more or less from the MSDN documentation) and any form of safe mode appearance for Vista and later.
IMPLEMENT_CPLREGISTER_FOR_ALL_USERS(_T("%MODULE%"), _T("5"), _T("{F2B50F10-8BC5-46a0-9FAC-6F2C4F1320E9}"), _T("Naughter.DemoApplet"), _T("%APPPATH%\\testcpl.xml"), CControlPanelApp::AnyFormOfSafeMode);

LONG CApp::OnInit()
{
  //Add the control panel applets to the control panel

  //The first applet
  AddApplet(new CControlPanelApplet(IDR_APPLET1, RUNTIME_CLASS(CDemoDlg))); 

  //The second applet
  AddApplet(new CControlPanelApplet(IDR_APPLET2, IDS_APPLET2_DESCRIPTION, RUNTIME_CLASS(CDemoPropertySheet))); 

  //Let the base class do its thing
  return CControlPanelApp::OnInit(); 
}
